package com.xyy.saas.payment.adpater.fumin.config;

import java.util.ArrayList;
import java.util.List;

public class AreaNode {

    /**
     * 地区名称
     */
    private String areaName;

    /**
     * 地区编码
     */
    private String areaCode;

    /**
     * 上级地区编码
     */
    private String preCode;

    /**
     * 下级地区列表
     */
    private List<AreaNode> nextAreaNode;

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public String getPreCode() {
        return preCode;
    }

    public void setPreCode(String preCode) {
        this.preCode = preCode;
    }

    public List<AreaNode> getNextAreaNode() {
        return nextAreaNode;
    }

    public void setNextAreaNode(List<AreaNode> nextAreaNode) {
        this.nextAreaNode = nextAreaNode;
    }

    public AreaNode(String areaName, String areaCode, String preCode, List<AreaNode> nextAreaNode) {
        this.areaName = areaName;
        this.areaCode = areaCode;
        this.preCode = preCode;
        this.nextAreaNode = nextAreaNode;
    }

    public AreaNode(String areaName, String areaCode, String preCode) {
        this.areaName = areaName;
        this.areaCode = areaCode;
        this.preCode = preCode;
        this.nextAreaNode = new ArrayList<>();
    }

    public void addNextNode(AreaNode areaNode) {
        this.nextAreaNode.add(areaNode);
    }
}
